#ifndef SHADER_H
#define SHADER_H

#ifdef WIN32
#include <windows.h>
#endif
#include "GL/glew.h"
#include "GL/glfw.h"
#include <GL/glu.h>
#include <stdio.h>

class Shader
{
public:
	Shader(char* _vert_path, char* _frag_path);
	~Shader();

	void bind();
	void unbind();
	void load();
	void reload();
	//void compile();
	//void link();

	void setUniform1(char* _id, int value);
	void setUniform1(char* _id, float value);
	void setUniform3(char* _id, float* value);
	//void setUniform1f(char* _id, float value);
	void setUniformMatrix4fv(char* _id, int _count, bool _transpose, float* value);

	char* vert_path;
	char* frag_path;
	GLuint shader_vert;
	GLuint shader_frag;
	GLuint shader_program;

private:
	char* readShaderFile(char *path);
	void printInfoLog(GLuint obj, bool prg);
};

#endif